home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_i.lzh / intuition / intuition.i < prev    next >
Text File  |  1991-03-14  |  49KB  |  1,287 lines

  1.     IFND    INTUITION_INTUITION_I
  2. INTUITION_INTUITION_I    SET    1
  3. **
  4. **    $Filename: intuition/intuition.i $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.28 $
  7. **    $Date: 91/02/22 $
  8. **
  9. **    Interface definitions for Intuition applications
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.  
  15.     IFND EXEC_TYPES_I
  16.     INCLUDE "exec/types.i"
  17.     ENDC
  18.  
  19.     IFND    GRAPHICS_GFX_I
  20.     INCLUDE    "graphics/gfx.i"
  21.     ENDC
  22.  
  23.     IFND    GRAPHICS_CLIP_I
  24.     INCLUDE    "graphics/clip.i"
  25.     ENDC
  26.  
  27.     IFND    GRAPHICS_VIEW_I
  28.     INCLUDE    "graphics/view.i"
  29.     ENDC
  30.  
  31.     IFND    GRAPHICS_RASTPORT_I
  32.     INCLUDE    "graphics/rastport.i"
  33.     ENDC
  34.  
  35.     IFND    GRAPHICS_LAYERS_I
  36.     INCLUDE    "graphics/layers.i"
  37.     ENDC
  38.  
  39.     IFND    GRAPHICS_TEXT_I
  40.     INCLUDE "graphics/text.i"
  41.     ENDC
  42.  
  43.     IFND EXEC_PORTS_I
  44.     INCLUDE "exec/ports.i"
  45.     ENDC
  46.  
  47.     IFND    DEVICES_TIMER_I
  48.     INCLUDE    "devices/timer.i"
  49.     ENDC
  50.  
  51.     IFND    DEVICES_INPUTEVENT_I
  52.     INCLUDE "devices/inputevent.i"
  53.     ENDC
  54.  
  55.     IFND UTILITY_TAGITEM_I
  56.     INCLUDE "utility/tagitem.i"
  57.     ENDC
  58.  
  59. *
  60. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  61. *
  62.  
  63.  
  64. ; ========================================================================;
  65. ; === Menu ===============================================================;
  66. ; ========================================================================;
  67.  STRUCTURE Menu,0
  68.  
  69.     APTR  mu_NextMenu    ; menu pointer, same level
  70.     WORD mu_LeftEdge    ; position of the select box
  71.     WORD mu_TopEdge    ; position of the select box
  72.     WORD mu_Width    ; dimensions of the select box
  73.     WORD mu_Height    ; dimensions of the select box
  74.     WORD mu_Flags    ; see flag definitions below
  75.     APTR mu_MenuName    ; text for this Menu Header
  76.     APTR  mu_FirstItem    ; pointer to first in chain
  77.  
  78.     ; these mysteriously-named variables are for internal use only
  79.     WORD mu_JazzX
  80.     WORD mu_JazzY
  81.     WORD mu_BeatX
  82.     WORD mu_BeatY
  83.  
  84.     LABEL mu_SIZEOF
  85.  
  86. ;*** FLAGS SET BY BOTH THE APPLIPROG AND INTUITION ***
  87. MENUENABLED EQU $0001    ; whether or not this menu is enabled
  88.  
  89. ;*** FLAGS SET BY INTUITION ***
  90. MIDRAWN EQU $0100    ; this menu's items are currently drawn
  91.  
  92. ; ========================================================================;
  93. ; === MenuItem ===========================================================;
  94. ; ========================================================================;
  95.  STRUCTURE MenuItem,0
  96.  
  97.     APTR mi_NextItem    ; pointer to next in chained list
  98.     WORD mi_LeftEdge    ; position of the select box
  99.     WORD mi_TopEdge    ; position of the select box
  100.     WORD mi_Width    ; dimensions of the select box
  101.     WORD mi_Height    ; dimensions of the select box
  102.     WORD mi_Flags    ; see the defines below
  103.  
  104.     LONG mi_MutualExclude ; set bits mean this item excludes that item
  105.  
  106.     APTR mi_ItemFill    ; points to Image, IntuiText, or NULL
  107.  
  108.     ; when this item is pointed to by the cursor and the items highlight
  109.     ; mode HIGHIMAGE is selected, this alternate image will be displayed
  110.     APTR mi_SelectFill    ; points to Image, IntuiText, or NULL
  111.  
  112.     BYTE mi_Command    ; only if appliprog sets the COMMSEQ flag
  113.  
  114.     BYTE mi_KludgeFill00 ; This is strictly for word-alignment
  115.  
  116.     APTR mi_SubItem    ; if non-zero, points to MenuItem for submenu
  117.  
  118.    ; The NextSelect field represents the menu number of next selected 
  119.    ; item (when user has drag-selected several items)
  120.     WORD mi_NextSelect
  121.  
  122.     LABEL  mi_SIZEOF
  123.  
  124. ; --- FLAGS SET BY THE APPLIPROG --------------------------------------------
  125. CHECKIT        EQU $0001    ; set to indicate checkmarkable item
  126. ITEMTEXT    EQU $0002    ; set if textual, clear if graphical item
  127. COMMSEQ        EQU $0004    ; set if there's an command sequence
  128. MENUTOGGLE    EQU $0008    ; set for toggling checks (else mut. exclude)
  129. ITEMENABLED    EQU $0010    ; set if this item is enabled
  130.  
  131. ; these are the SPECIAL HIGHLIGHT FLAG state meanings
  132. HIGHFLAGS    EQU $00C0    ; see definitions below for these bits
  133. HIGHIMAGE    EQU $0000    ; use the user's "select image"
  134. HIGHCOMP    EQU $0040    ; highlight by complementing the select box
  135. HIGHBOX        EQU $0080    ; highlight by drawing a box around the image
  136. HIGHNONE    EQU $00C0    ; don't highlight
  137.  
  138. ; --- FLAGS SET BY BOTH APPLIPROG AND INTUITION -----------------------------
  139. CHECKED    EQU $0100    ; state of the checkmark
  140.  
  141.  
  142. ; --- FLAGS SET BY INTUITION ------------------------------------------------
  143. ISDRAWN        EQU $1000    ; this item's subs are currently drawn
  144. HIGHITEM    EQU $2000    ; this item is currently highlighted
  145. MENUTOGGLED    EQU $4000    ; this item was already toggled 
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152. ; ========================================================================
  153. ; === Requester ==========================================================
  154. ; ========================================================================
  155.  STRUCTURE Requester,0
  156.  
  157.     APTR  rq_OlderRequest
  158.     WORD rq_LeftEdge        ; dimensions of the entire box
  159.     WORD rq_TopEdge        ; dimensions of the entire box
  160.     WORD rq_Width        ; dimensions of the entire box
  161.     WORD rq_Height        ; dimensions of the entire box
  162.  
  163.     WORD rq_RelLeft        ; get POINTREL Pointer relativity offsets
  164.     WORD rq_RelTop        ; get POINTREL Pointer relativity offsets
  165.  
  166.     APTR  rq_ReqGadget         ; pointer to the first of a list of gadgets
  167.     APTR  rq_ReqBorder        ; the box's border
  168.     APTR  rq_ReqText        ; the box's text
  169.  
  170.     WORD  rq_Flags        ; see definitions below
  171.  
  172.     UBYTE rq_BackFill        ; pen number for back-plane fill before draws
  173.  
  174.     BYTE rq_KludgeFill00    ; This is strictly for word-alignment
  175.  
  176.     APTR rq_ReqLayer        ; layer in which requester rendered
  177.     STRUCT rq_ReqPad1,32    ; for backwards compatibility (reserved)
  178.  
  179.     ; If the BitMap plane pointers are non-zero, this tells the system 
  180.     ; that the image comes pre-drawn (if the appliprog wants to define 
  181.     ; its own box, in any shape or size it wants!); this is OK by 
  182.     ; Intuition as long as there's a good correspondence between the image
  183.     ; and the specified Gadgets
  184.     APTR  rq_ImageBMap        ; points to the BitMap of PREDRAWN imagery
  185.  
  186.     APTR  rq_RWindow        ; points back to requester's window
  187.     APTR  rq_ReqImage        ; new for V36: drawn if USEREQIMAGE set
  188.     STRUCT rq_ReqPad2,32    ; for backwards compatibility (reserved)
  189.  
  190.     LABEL rq_SIZEOF
  191.  
  192. ; FLAGS SET BY THE APPLIPROG
  193. POINTREL    EQU $0001  ; if POINTREL set, TopLeft is relative to pointer
  194.                ; for DMRequester, relative to window center
  195.                ; for Request().
  196. PREDRAWN    EQU $0002  ; if ReqBMap points to predrawn Requester imagery
  197. NOISYREQ     EQU $0004  ; if you don't want requester to filter input
  198.  
  199. ; New for V36
  200. SIMPLEREQ    EQU $0010  ; to use SIMPLEREFRESH layer (recommended)
  201. USEREQIMAGE    EQU $0020  ; render linked list ReqImage after BackFill
  202.                ; but before gadgets and text
  203. NOREQBACKFILL    EQU $0040  ; don't bother filling with Requester.BackFill
  204.  
  205.  
  206. ; FLAGS SET BY INTUITION;
  207. REQOFFWINDOW    EQU $1000    ; part of one of the Gadgets was offwindow
  208. REQACTIVE    EQU $2000    ; this requester is active
  209. SYSREQUEST    EQU $4000    ; this requester caused by system
  210. DEFERREFRESH    EQU $8000    ; this Requester stops a Refresh broadcast
  211.  
  212.  
  213.  
  214.  
  215.  
  216. ; ========================================================================
  217. ; === Gadget =============================================================
  218. ; ========================================================================
  219.  STRUCTURE Gadget,0
  220.  
  221.     APTR gg_NextGadget        ; next gadget in the list
  222.  
  223.     WORD gg_LeftEdge        ; "hit box" of gadget
  224.     WORD gg_TopEdge        ; "hit box" of gadget
  225.     WORD gg_Width        ; "hit box" of gadget
  226.     WORD gg_Height        ; "hit box" of gadget
  227.  
  228.     WORD gg_Flags         ; see below for list of defines
  229.  
  230.     WORD gg_Activation        ; see below for list of defines
  231.  
  232.     WORD gg_GadgetType        ; see below for defines
  233.  
  234.     ; appliprog can specify that the Gadget be rendered as either as Border
  235.     ; or an Image.  This variable points to which (or equals NULL if there's
  236.     ; nothing to be rendered about this Gadget)
  237.     APTR gg_GadgetRender
  238.  
  239.     ; appliprog can specify "highlighted" imagery rather than algorithmic
  240.     ; this can point to either Border or Image data
  241.     APTR gg_SelectRender
  242.  
  243.     APTR gg_GadgetText        ; text for this gadget;
  244.  
  245.     ; MutualExclude, never implemented, is now declared obsolete.
  246.     ; There are published examples of implementing a more general
  247.     ; and practical exclusion in your applications.
  248.     ;
  249.     ; Starting V36, this field is used to point to a hook
  250.     ; for a custom gadget.
  251.     ;
  252.     ; Programs using this field for their own processing will
  253.     ; continue to work, as long as they don't try the
  254.     ; trick with custom gadgets
  255.     LONG gg_MutualExclude     ; obsolete
  256.  
  257.     ; pointer to a structure of special data required by Proportional, String 
  258.     ; and Integer Gadgets
  259.     APTR gg_SpecialInfo
  260.  
  261.     WORD gg_GadgetID    ; user-definable ID field
  262.     APTR  gg_UserData    ; ptr to general purpose User data (ignored by Intuit)
  263.  
  264.     LABEL gg_SIZEOF
  265.  
  266. ; --- Gadget.Flags values ---
  267. ; combinations in these bits describe the highlight technique to be used
  268. GFLG_GADGHIGHBITS    EQU $0003
  269. GFLG_GADGHCOMP        EQU $0000    ; Complement the select box
  270. GFLG_GADGHBOX        EQU $0001    ; Draw a box around the image
  271. GFLG_GADGHIMAGE        EQU $0002    ; Blast in this alternate image
  272. GFLG_GADGHNONE        EQU $0003    ; don't highlight
  273.  
  274. ; set this flag if the GadgetRender and SelectRender point to Image imagery,
  275. ; clear if it's a Border 
  276. GFLG_GADGIMAGE        EQU $0004
  277.  
  278. ; combinations in these next two bits specify to which corner the gadget's
  279. ; Left & Top coordinates are relative.    If relative to Top/Left,
  280. ; these are "normal" coordinates (everything is relative to something in
  281. ; this universe)
  282. GFLG_RELBOTTOM        EQU $0008    ; set if rel to bottom, clear if to top
  283. GFLG_RELRIGHT        EQU $0010    ; set if rel to right, clear if to left
  284. ; set the GFLG_RELWIDTH bit to spec that Width is relative to width of screen
  285. GFLG_RELWIDTH        EQU $0020
  286. ; set the GFLG_RELHEIGHT bit to spec that Height is rel to height of screen
  287. GFLG_RELHEIGHT        EQU $0040
  288.  
  289. ; the GFLG_SELECTED flag is initialized by you and set by Intuition.  It
  290. ; specifies whether or not this Gadget is currently selected/highlighted
  291. GFLG_SELECTED        EQU $0080
  292.  
  293.  
  294. ; the GFLG_DISABLED flag is initialized by you and later set by Intuition
  295. ; according to your calls to On/OffGadget().  It specifies whether or not
  296. ; this Gadget is currently disabled from being selected
  297. GFLG_DISABLED        EQU $0100
  298.  
  299. * These flags specify the type of text field that Gadget.GadgetText
  300. * points to.  In all normal (pre-V36) gadgets which you initialize
  301. * this field should always be zero.  Some types of gadget objects
  302. * created from classes will use these fields to keep track of
  303. * types of labels/contents that different from IntuiText, but are
  304. * stashed in GadgetText.
  305.  
  306. GFLG_LABELMASK        EQU    $3000
  307. GFLG_LABELITEXT        EQU    $0000    ; GadgetText points to IntuiText
  308. GFLG_LABELSTRING    EQU    $1000    ; GadgetText points to (UBYTE *)
  309. GFLG_LABELIMAGE        EQU    $2000    ; GadgetText points to Image (object)
  310. ; New for V37: GFLG_TABCYCLE
  311. GFLG_TABCYCLE        EQU    $0200    ; (string or custom) gadget
  312.                 ; participates in cycling activation with
  313.                 ; Tab or Shift-Tab
  314.  
  315. ; New for V37: GFLG_STRINGEXTEND.  We discovered that V34 doesn't properly
  316. ; ignore the value we had chosen for the Gadget->Activation flag
  317. ; GACT_STRINGEXTEND.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  318. ; The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  319. ; safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  320. ; (Note that the two flags are not numerically equal)
  321. GFLG_STRINGEXTEND    EQU    $0400  ; this String Gadget has StringExtend
  322.  
  323.  
  324.  
  325. ; --- These are the Activation flag bits ----------------------------------
  326. ; GACT_RELVERIFY is set if you want to verify that the pointer was still over
  327. ; the gadget when the select button was released.  Will cause
  328. ; an IDCMP_GADGETUP message to be sent if so.
  329. GACT_RELVERIFY        EQU $0001
  330.  
  331. ; the flag GACT_IMMEDIATE, when set, informs the caller that the gadget
  332. ; was activated when it was activated.  this flag works in conjunction with
  333. ; the GACT_RELVERIFY flag
  334. GACT_IMMEDIATE        EQU $0002
  335.  
  336. ; the flag GACT_ENDGADGET, when set, tells the system that this gadget, when
  337. ; selected, causes the Requester or AbsMessage to be ended.  Requesters or
  338. ; AbsMessages that are ended are erased and unlinked from the system
  339. GACT_ENDGADGET        EQU $0004
  340.  
  341. ; the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  342. ; reports on mouse movements while this gadget is active.
  343. ; You probably want to set the GACT_IMMEDIATE flag when using
  344. ; GACT_FOLLOWMOUSE, since that's the only reasonable way you have of learning
  345. ; why Intuition is suddenly sending you a stream of mouse movement events.
  346. ; If you don't set GACT_RELVERIFY, you'll get at least one Mouse Position
  347. ; event.
  348. GACT_FOLLOWMOUSE    EQU $0008
  349.  
  350. ; if any of the BORDER flags are set in a Gadget that's included in the
  351. ; Gadget list when a Window is opened, the corresponding Border will
  352. ; be adjusted to make room for the Gadget
  353. GACT_RIGHTBORDER    EQU $0010
  354. GACT_LEFTBORDER        EQU $0020
  355. GACT_TOPBORDER        EQU $0040
  356. GACT_BOTTOMBORDER    EQU $0080
  357. GACT_BORDERSNIFF    EQU $8000    ; neither set nor rely on this bit
  358.  
  359. GACT_TOGGLESELECT    EQU $0100    ; this bit for toggle-select mode
  360. GACT_BOOLEXTEND        EQU $2000    ; This Boolean Gadget has a BoolInfo
  361.  
  362. ; should properly be in StringInfo, but aren't
  363. GACT_STRINGLEFT        EQU $0000    ; NOTE WELL: that this has value zero
  364. GACT_STRINGCENTER    EQU $0200    ; center the String
  365. GACT_STRINGRIGHT    EQU $0400    ; right-justify the String
  366. GACT_LONGINT        EQU $0800    ; This String Gadget is a Long Integer
  367. GACT_ALTKEYMAP        EQU $1000    ; has an alternate keymapping
  368. GACT_STRINGEXTEND    EQU $2000    ; this String Gadget has an extension
  369.                     ; NOTE: NEVER SET GACT_STRINGEXTEND
  370.                     ; IF YOU ARE RUNNING ON LESS THAN V36!
  371.                     ; SEE GFLG_STRINGEXTEND (ABOVE) INSTEAD
  372.  
  373. GACT_ACTIVEGADGET    EQU $4000    ; this gadget is "active".  This flag
  374.                 ; is maintained by Intuition, and you
  375.                 ; cannot count on its value persisting
  376.                 ; while you do something on your program's
  377.                 ; task.  It can only be trusted by
  378.                 ; people implementing custom gadgets
  379.  
  380. * note $8000 is used above (GACT_BORDERSNIFF); all Activation flags defined
  381.  
  382.  
  383.  
  384. ; --- GADGET TYPES -----------------------------------------------------------
  385. ; These are the Gaget Type definitions for the variable GadgetType.
  386. ; Gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  387. ; first comes the mask for Gadget flags reserved for Gadget typing
  388. GTYP_GADGETTYPE        EQU $FC00    ; all Gadget Global Type flags
  389.                     ; (padded)
  390. GTYP_SYSGADGET        EQU $8000    ; 1 = Allocated by the system, 0 = by app.
  391. GTYP_SCRGADGET        EQU $4000    ; 1 = ScreenGadget, 0 = WindowGadget
  392. GTYP_GZZGADGET        EQU $2000    ; 1 = Gadget for WFLG_GIMMEZEROZERO
  393.                     ;     borders
  394. GTYP_REQGADGET        EQU $1000    ; 1 = this is a Requester Gadget
  395. ; system gadgets
  396. GTYP_SIZING        EQU $0010
  397. GTYP_WDRAGGING        EQU $0020
  398. GTYP_SDRAGGING        EQU $0030
  399. GTYP_WUPFRONT        EQU $0040
  400. GTYP_SUPFRONT        EQU $0050
  401. GTYP_WDOWNBACK        EQU $0060
  402. GTYP_SDOWNBACK        EQU $0070
  403. GTYP_CLOSE        EQU $0080
  404. ; application gadgets
  405. GTYP_BOOLGADGET        EQU $0001
  406. GTYP_GADGET0002        EQU $0002
  407. GTYP_PROPGADGET        EQU $0003
  408. GTYP_STRGADGET        EQU $0004
  409. GTYP_CUSTOMGADGET    EQU $0005
  410. GTYP_GTYPEMASK        EQU $0004    ; masks out to gadget class
  411.  
  412.  
  413.  
  414. ; ======================================================================== 
  415. ; === BoolInfo============================================================
  416. ; ======================================================================== 
  417. ; This is the special data needed by an Extended Boolean Gadget
  418. ; Typically this structure will be pointed to by the Gadget field SpecialInfo
  419.  
  420.  STRUCTURE BoolInfo,0
  421.  
  422.     WORD    bi_Flags    ; defined below 
  423.     APTR    bi_Mask    ; bit mask for highlighting and selecting
  424.             ; mask must follow the same rules as an Image
  425.             ; plane.  Its width and height are determined
  426.             ; by the width and height of the gadget's
  427.             ; select box. (i.e. Gadget.Width and .Height).
  428.     LONG    bi_Reserved    ; set to 0
  429.  
  430.     LABEL   bi_SIZEOF
  431.  
  432. ; set BoolInfo.Flags to this flag bit.
  433. ; in the future, additional bits might mean more stuff hanging
  434. ; off of BoolInfo.Reserved.
  435.  
  436. BOOLMASK    EQU    $0001    ; extension is for masked gadget
  437.  
  438. ; ========================================================================
  439. ; === PropInfo ===========================================================
  440. ; ========================================================================
  441. ; this is the special data required by the proportional Gadget
  442. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  443.  STRUCTURE PropInfo,0
  444.  
  445.     WORD pi_Flags    ; general purpose flag bits (see defines below)
  446.  
  447.     ; You initialize the Pot variables before the Gadget is added to
  448.     ; the system.  Then you can look here for the current settings
  449.     ; any time, even while User is playing with this Gadget.  To
  450.     ; adjust these after the Gadget is added to the System, use
  451.     ; ModifyProp(); The Pots are the actual proportional settings,
  452.     ; where a value of zero means zero and a value of MAXPOT means
  453.     ; that the Gadget is set to its maximum setting.
  454.     WORD pi_HorizPot    ; 16-bit FixedPoint horizontal quantity percentage;
  455.     WORD pi_VertPot    ; 16-bit FixedPoint vertical quantity percentage;
  456.  
  457.     ; the 16-bit FixedPoint Body variables describe what percentage
  458.     ; of the entire body of stuff referred to by this Gadget is
  459.     ; actually shown at one time.  This is used with the AUTOKNOB
  460.     ; routines, to adjust the size of the AUTOKNOB according to how
  461.     ; much of the data can be seen.  This is also used to decide how
  462.     ; far to advance the Pots when User hits the Container of the Gadget.
  463.     ; For instance, if you were controlling the display of a 5-line
  464.     ; Window of text with this Gadget, and there was a total of 15
  465.     ; lines that could be displayed, you would set the VertBody value to
  466.     ;     (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  467.     ; Therefore, the AUTOKNOB would fill 1/3 of the container, and if
  468.     ; User hits the Cotainer outside of the knob, the pot would advance
  469.     ; 1/3 (plus or minus) If there's no body to show, or the total 
  470.     ; amount of displayable info is less than the display area, set the 
  471.     ; Body variables to the MAX.  To adjust these after the Gadget is 
  472.     ; added to the System, use ModifyProp().
  473.     WORD pi_HorizBody    ; horizontal Body
  474.     WORD pi_VertBody    ; vertical Body
  475.  
  476.     ; these are the variables that Intuition sets and maintains
  477.     WORD pi_CWidth    ; Container width (with any relativity absoluted)
  478.     WORD pi_CHeight    ; Container height (with any relativity absoluted)
  479.     WORD pi_HPotRes    ; pot increments
  480.     WORD pi_VPotRes    ; pot increments
  481.     WORD pi_LeftBorder    ; Container borders
  482.     WORD pi_TopBorder    ; Container borders
  483.     LABEL  pi_SIZEOF
  484.  
  485. ; --- FLAG BITS --------------------------------------------------------------
  486. AUTOKNOB    EQU $0001    ; this flag sez:  gimme that old auto-knob
  487. FREEHORIZ    EQU $0002    ; if set, the knob can move horizontally
  488. FREEVERT    EQU $0004    ; if set, the knob can move vertically
  489. PROPBORDERLESS    EQU $0008    ; if set, no border will be rendered
  490. KNOBHIT        EQU $0100    ; set when this Knob is hit
  491. PROPNEWLOOK    EQU $0010    ; set this if you want to get the new
  492.                 ; V36 look
  493.  
  494. KNOBHMIN    EQU 6        ; minimum horizontal size of the knob
  495. KNOBVMIN     EQU 4        ; minimum vertical size of the knob
  496. MAXBODY        EQU $FFFF    ; maximum body value
  497. MAXPOT         EQU $FFFF    ; maximum pot value
  498.  
  499.  
  500. ; ========================================================================
  501. ; === StringInfo =========================================================
  502. ; ========================================================================
  503. ; this is the special data required by the string Gadget
  504. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  505.  STRUCTURE StringInfo,0
  506.  
  507.     ; you initialize these variables, and then Intuition maintains them
  508.     APTR  si_Buffer    ; the buffer containing the start and final string
  509.     APTR  si_UndoBuffer    ; optional buffer for undoing current entry
  510.     WORD si_BufferPos    ; character position in Buffer
  511.     WORD si_MaxChars    ; max number of chars in Buffer (including NULL)
  512.     WORD si_DispPos    ; Buffer position of first displayed character
  513.  
  514.     ; Intuition initializes and maintains these variables for you
  515.     WORD si_UndoPos    ; character position in the undo buffer
  516.     WORD si_NumChars    ; number of characters currently in Buffer
  517.     WORD si_DispCount    ; number of whole characters visible in Container
  518.     WORD si_CLeft    ; topleft offset of the container
  519.     WORD si_CTop    ; topleft offset of the container
  520.  
  521.     ; unused field is changed to allow extended specification
  522.     ; of string gadget parameters.  It is ignored unless the flag
  523.     ; GACT_STRINGEXTEND is set in the Gadget's Activation field
  524.     ; or the GFLG_STRINGEXTEND flag is set in the Gadget Flags field.
  525.     ; (See GFLG_STRINGEXTEND for an important note)
  526.     ;APTR  si_LayerPtr    ; --- obsolete ---
  527.     APTR  si_Extension
  528.  
  529.     ; you can initialize this variable before the gadget is submitted to
  530.     ; Intuition, and then examine it later to discover what integer
  531.     ; the user has entered (if the user never plays with the gadget,
  532.     ; the value will be unchanged from your initial setting)
  533.     LONG  si_LongInt    ; the LONG return value of a GACT_LONGINT String Gad.
  534.  
  535.     ; If you want this Gadget to use your own Console keymapping, you
  536.     ; set the GACT_ALTKEYMAP bit in the Activation flags of the Gadget, and
  537.     ; then set this variable to point to your keymap.  If you don't set the
  538.     ; GACT_ALTKEYMAP, you'll get the standard ASCII keymapping.
  539.     APTR si_AltKeyMap
  540.  
  541.     LABEL si_SIZEOF
  542.  
  543.  
  544.  
  545.  
  546. ; ========================================================================
  547. ; === IntuiText ==========================================================
  548. ; ========================================================================
  549. ; IntuiText is a series of strings that start with a location
  550. ; (always relative to the upper-left corner of something) and then the
  551. ; text of the string.  The text is null-terminated.
  552.  STRUCTURE IntuiText,0
  553.  
  554.     BYTE it_FrontPen        ; the pens for rendering the text
  555.     BYTE it_BackPen        ; the pens for rendering the text
  556.  
  557.     BYTE it_DrawMode        ; the mode for rendering the text
  558.  
  559.     BYTE it_KludgeFill00    ; This is strictly for word-alignment
  560.  
  561.     WORD it_LeftEdge        ; relative start location for the text
  562.     WORD it_TopEdge        ; relative start location for the text
  563.  
  564.     APTR  it_ITextFont        ; if NULL, you accept the defaults
  565.  
  566.     APTR it_IText        ; pointer to null-terminated text
  567.  
  568.     APTR  it_NextText        ; pointer to another IntuiText to render
  569.  
  570.     LABEL it_SIZEOF
  571.  
  572.  
  573.  
  574.  
  575.  
  576. ; ========================================================================
  577. ; === Border =============================================================
  578. ; ========================================================================
  579. ; Data type Border, used for drawing a series of lines which is intended for
  580. ; use as a border drawing, but which may, in fact, be used to render any
  581. ; arbitrary vector shape.
  582. ; The routine DrawBorder sets up the RastPort with the appropriate
  583. ; variables, then does a Move to the first coordinate, then does Draws
  584. ; to the subsequent coordinates.
  585. ; After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  586. ; on NextBorder
  587.  STRUCTURE Border,0
  588.  
  589.     WORD  bd_LeftEdge        ; initial offsets from the origin
  590.     WORD  bd_TopEdge        ; initial offsets from the origin
  591.     BYTE  bd_FrontPen        ; pen number for rendering
  592.     BYTE  bd_BackPen        ; pen number for rendering
  593.     BYTE  bd_DrawMode        ; mode for rendering
  594.     BYTE  bd_Count        ; number of XY pairs
  595.     APTR  bd_XY            ; vector coordinate pairs rel to LeftTop
  596.     APTR  bd_NextBorder        ; pointer to any other Border too
  597.  
  598.     LABEL bd_SIZEOF
  599.  
  600.  
  601. ; ========================================================================
  602. ; === Image ==============================================================
  603. ; ========================================================================
  604. ; This is a brief image structure for very simple transfers of
  605. ; image data to a RastPort
  606.  STRUCTURE Image,0
  607.  
  608.     WORD ig_LeftEdge        ; starting offset relative to something
  609.     WORD ig_TopEdge        ; starting offset relative to something
  610.     WORD ig_Width        ; pixel size (though data is word-aligned)
  611.     WORD ig_Height        ; pixel size
  612.     WORD ig_Depth        ; pixel size
  613.     APTR ig_ImageData        ; pointer to the actual image bits
  614.  
  615.     ; the PlanePick and PlaneOnOff variables work much the same way as the
  616.     ; equivalent GELS Bob variables.  It's a space-saving 
  617.     ; mechanism for image data.  Rather than defining the image data
  618.     ; for every plane of the RastPort, you need define data only for planes 
  619.     ; that are not entirely zero or one.  As you define your Imagery, you will
  620.     ; often find that most of the planes ARE just as color selectors.  For
  621.     ; instance, if you're designing a two-color Gadget to use colors two and
  622.     ; three, and the Gadget will reside in a five-plane display, plane zero
  623.     ; of your imagery would be all ones, bit plane one would have data that
  624.     ; describes the imagery, and bit planes two through four would be
  625.     ; all zeroes.  Using these flags allows you to avoid wasting all that
  626.     ; memory in this way:
  627.     ; first, you specify which planes you want your data to appear
  628.     ; in using the PlanePick variable.    For each bit set in the variable, the
  629.     ; next "plane" of your image data is blitted to the display.  For each bit
  630.     ; clear in this variable, the corresponding bit in PlaneOnOff is examined.
  631.     ; If that bit is clear, a "plane" of zeroes will be used.  If the bit is
  632.     ; set, ones will go out instead.  So, for our example:
  633.     ;    Gadget.PlanePick = 0x02;
  634.     ;    Gadget.PlaneOnOff = 0x01;
  635.     ; Note that this also allows for generic Gadgets, like the System Gadgets,
  636.     ; which will work in any number of bit planes
  637.     ; Note also that if you want an Image that is only a filled rectangle,
  638.     ; you can get this by setting PlanePick to zero (pick no planes of data)
  639.     ; and set PlaneOnOff to describe the pen color of the rectangle.
  640.     ;
  641.     ; NOTE:  Intuition relies on PlanePick to know how many planes
  642.     ; of data are found in ImageData.  There should be no more
  643.     ; '1'-bits in PlanePick than there are planes in ImageData.
  644.     BYTE ig_PlanePick
  645.     BYTE ig_PlaneOnOff
  646.  
  647.     ; if the NextImage variable is not NULL, Intuition presumes that
  648.     ; it points to another Image structure with another Image to be
  649.     ; rendered
  650.     APTR ig_NextImage
  651.  
  652.  
  653.     LABEL ig_SIZEOF
  654.  
  655.  
  656.  
  657.  
  658. ; ========================================================================
  659. ; === IntuiMessage =======================================================
  660. ; ========================================================================
  661.  STRUCTURE IntuiMessage,0
  662.  
  663.     STRUCT im_ExecMessage,MN_SIZE
  664.  
  665.     ; the Class bits correspond directly with the IDCMP Flags, except for the
  666.     ; special bit IDCMP_LONELYMESSAGE (defined below)
  667.     LONG im_Class
  668.  
  669.     ; the Code field is for special values like MENU number
  670.     WORD im_Code
  671.  
  672.     ; the Qualifier field is a copy of the current InputEvent's Qualifier 
  673.     WORD im_Qualifier
  674.  
  675.     ; IAddress contains particular addresses for Intuition functions, like
  676.     ; the pointer to the Gadget or the Screen
  677.     APTR im_IAddress
  678.  
  679.     ; when getting mouse movement reports, any event you get will have the
  680.     ; the mouse coordinates in these variables.  the coordinates are relative
  681.     ; to the upper-left corner of your Window (WFLG_GIMMEZEROZERO
  682.     ; notwithstanding)
  683.     ; If the DELTAMOVE IDCMP flag is set, these values will be deltas from
  684.     ; the last reported position.
  685.     WORD im_MouseX
  686.     WORD im_MouseY
  687.  
  688.     ; the time values are copies of the current system clock time.  Micros
  689.     ; are in units of microseconds, Seconds in seconds.
  690.     LONG im_Seconds
  691.     LONG im_Micros
  692.  
  693.     ; the IDCMPWindow variable will always have the address of the Window of 
  694.     ; this IDCMP 
  695.     APTR im_IDCMPWindow
  696.  
  697.     ; system-use variable 
  698.     APTR im_SpecialLink
  699.  
  700.     LABEL  im_SIZEOF
  701.  
  702.  
  703.  
  704. ; --- IDCMP Classes ------------------------------------------------------ 
  705. ; Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  706. ; Manual for full details on the IDCMP classes.
  707.  
  708. IDCMP_SIZEVERIFY    EQU    $00000001
  709. IDCMP_NEWSIZE        EQU    $00000002
  710. IDCMP_REFRESHWINDOW    EQU    $00000004
  711. IDCMP_MOUSEBUTTONS    EQU    $00000008
  712. IDCMP_MOUSEMOVE        EQU    $00000010
  713. IDCMP_GADGETDOWN    EQU    $00000020
  714. IDCMP_GADGETUP        EQU    $00000040
  715. IDCMP_REQSET        EQU    $00000080
  716. IDCMP_MENUPICK        EQU    $00000100
  717. IDCMP_CLOSEWINDOW    EQU    $00000200
  718. IDCMP_RAWKEY        EQU    $00000400
  719. IDCMP_REQVERIFY        EQU    $00000800
  720. IDCMP_REQCLEAR        EQU    $00001000
  721. IDCMP_MENUVERIFY    EQU    $00002000
  722. IDCMP_NEWPREFS        EQU    $00004000
  723. IDCMP_DISKINSERTED    EQU    $00008000
  724. IDCMP_DISKREMOVED    EQU    $00010000
  725. IDCMP_WBENCHMESSAGE    EQU    $00020000    ; System use only
  726. IDCMP_ACTIVEWINDOW    EQU    $00040000
  727. IDCMP_INACTIVEWINDOW    EQU    $00080000
  728. IDCMP_DELTAMOVE        EQU    $00100000
  729. IDCMP_VANILLAKEY    EQU    $00200000
  730. IDCMP_INTUITICKS    EQU    $00400000
  731. ;  for notifications from "boopsi" gadgets:
  732. IDCMP_IDCMPUPDATE    EQU    $00800000      ; new for V36
  733. ; for getting help key report during menu session:
  734. IDCMP_MENUHELP        EQU    $01000000      ; new for V36
  735. ; for notification of any move/size/zoom/change window:
  736. IDCMP_CHANGEWINDOW    EQU    $02000000      ; new for V36
  737. ; NOTEZ-BIEN:        $80000000 is reserved for internal use by IDCMP
  738.  
  739. ; the IDCMP Flags do not use this special bit, which is cleared when
  740. ; Intuition sends its special message to the Task, and set when Intuition
  741. ; gets its Message back from the Task.  Therefore, I can check here to
  742. ; find out fast whether or not this Message is available for me to send
  743. IDCMP_LONELYMESSAGE    EQU    $80000000
  744.  
  745.  
  746.  
  747. ; --- IDCMP Codes -------------------------------------------------------- 
  748. ; This group of codes is for the IDCMP_MENUVERIFY function 
  749. MENUHOT        EQU    $0001    ; IntuiWants verification or MENUCANCEL    
  750. MENUCANCEL    EQU    $0002    ; HOT Reply of this cancels Menu operation 
  751. MENUWAITING    EQU    $0003    ; Intuition simply wants a ReplyMsg() ASAP 
  752.  
  753. ; These are internal tokens to represent state of verification attempts
  754. ; shown here as a clue.
  755. OKOK        EQU    MENUHOT        ; guy didn't care
  756. OKABORT        EQU    $0004        ; window rendered question moot
  757. OKCANCEL    EQU    MENUCANCEL    ; window sent cancel reply
  758.  
  759. ; This group of codes is for the IDCMP_WBENCHMESSAGE messages
  760. WBENCHOPEN    EQU $0001
  761. WBENCHCLOSE    EQU $0002
  762.  
  763. ; A data structure common in V36 Intuition processing
  764.  
  765.  STRUCTURE    IBox,0
  766.     WORD    ibox_Left
  767.     WORD    ibox_Top
  768.     WORD    ibox_Width
  769.     WORD    ibox_Height
  770.  LABEL    ibox_SIZEOF
  771.  
  772.  
  773. ; ========================================================================
  774. ; === Window =============================================================
  775. ; ========================================================================
  776.  STRUCTURE Window,0
  777.  
  778.     APTR wd_NextWindow        ; for the linked list of a Screen
  779.  
  780.     WORD wd_LeftEdge        ; screen dimensions
  781.     WORD wd_TopEdge        ; screen dimensions
  782.     WORD wd_Width        ; screen dimensions
  783.     WORD wd_Height        ; screen dimensions
  784.  
  785.     WORD wd_MouseY        ; relative top top-left corner
  786.     WORD wd_MouseX        ; relative top top-left corner
  787.  
  788.     WORD wd_MinWidth        ; minimum sizes
  789.     WORD wd_MinHeight        ; minimum sizes
  790.     WORD wd_MaxWidth        ; maximum sizes
  791.     WORD wd_MaxHeight        ; maximum sizes
  792.  
  793.     LONG wd_Flags        ; see below for definitions
  794.  
  795.     APTR wd_MenuStrip        ; first in a list of menu headers
  796.  
  797.     APTR wd_Title        ; title text for the Window
  798.  
  799.     APTR wd_FirstRequest    ; first in linked list of active Requesters
  800.     APTR wd_DMRequest        ; the double-menu Requester
  801.     WORD wd_ReqCount        ; number of Requesters blocking this Window
  802.     APTR wd_WScreen        ; this Window's Screen
  803.     APTR wd_RPort        ; this Window's very own RastPort
  804.  
  805.     ; the border variables describe the window border.    If you specify
  806.     ; WFLG_GIMMEZEROZERO when you open the window, then the upper-left of the
  807.     ; ClipRect for this window will be upper-left of the BitMap (with correct
  808.     ; offsets when in SuperBitMap mode; you MUST select WFLG_GIMMEZEROZERO
  809.     ; when using SuperBitMap).    If you don't specify ZeroZero, then you save
  810.     ; memory (no allocation of RastPort, Layer, ClipRect and associated
  811.     ; Bitmaps), but you also must offset all your writes by BorderTop,
  812.     ; BorderLeft and do your own mini-clipping to prevent writing over the
  813.     ; system gadgets
  814.     BYTE wd_BorderLeft
  815.     BYTE wd_BorderTop
  816.     BYTE wd_BorderRight
  817.     BYTE wd_BorderBottom
  818.     APTR wd_BorderRPort
  819.  
  820.     ; You supply a linked-list of gadget that you want for your Window.
  821.     ; This list DOES NOT include system Gadgets.  You get the standard
  822.     ; window system Gadgets by setting flag-bits in the variable Flags (see
  823.     ; the bit definitions below)
  824.     APTR wd_FirstGadget
  825.  
  826.     ; these are for opening/closing the windows 
  827.     APTR wd_Parent
  828.     APTR wd_Descendant
  829.  
  830.     ; sprite data information for your own Pointer
  831.     ; set these AFTER you Open the Window by calling SetPointer()
  832.     APTR wd_Pointer
  833.     BYTE wd_PtrHeight
  834.     BYTE wd_PtrWidth
  835.     BYTE wd_XOffset
  836.     BYTE wd_YOffset
  837.  
  838.     ; the IDCMP Flags and User's and Intuition's Message Ports 
  839.     ULONG wd_IDCMPFlags
  840.     APTR wd_UserPort
  841.     APTR wd_WindowPort
  842.     APTR wd_MessageKey
  843.  
  844.     BYTE wd_DetailPen
  845.     BYTE wd_BlockPen
  846.  
  847.     ; the CheckMark is a pointer to the imagery that will be used when 
  848.     ; rendering MenuItems of this Window that want to be checkmarked
  849.     ; if this is equal to NULL, you'll get the default imagery
  850.     APTR wd_CheckMark
  851.  
  852.     ; if non-null, Screen title when Window is active
  853.     APTR wd_ScreenTitle
  854.  
  855.     ; These variables have the mouse coordinates relative to the
  856.     ; inner-Window of WFLG_GIMMEZEROZERO Windows.  This is compared with the
  857.     ; MouseX and MouseY variables, which contain the mouse coordinates
  858.     ; relative to the upper-left corner of the Window, WFLG_GIMMEZEROZERO
  859.     ; notwithstanding
  860.     WORD wd_GZZMouseX
  861.     WORD wd_GZZMouseY
  862.     ; these variables contain the width and height of the inner-Window of
  863.     ; WFLG_GIMMEZEROZERO Windows
  864.     WORD wd_GZZWidth
  865.     WORD wd_GZZHeight
  866.  
  867.     APTR wd_ExtData
  868.  
  869.     ; general-purpose pointer to User data extension
  870.     APTR wd_UserData
  871.     APTR wd_WLayer    ; stash of Window.RPort->Layer
  872.  
  873.     ; NEW 1.2: need to keep track of the font that OpenWindow opened,
  874.     ; in case user SetFont's into RastPort
  875.     APTR  wd_IFont
  876.  
  877.     ; (V36) another flag word (the Flags field is used up).
  878.     ; At present, all flag values are system private.
  879.     ; Until further notice, you may not change nor use this field.
  880.     ULONG wd_MoreFlags
  881.  
  882.     ; ----- subsequent fields are INTUITION PRIVATE ---
  883.  
  884.     LABEL wd_Size
  885.     LABEL wd_SIZEOF    ; you should never use this: only Intuition allocates
  886.  
  887. ; --- Flags requested at OpenWindow() time by the application -------------
  888. WFLG_SIZEGADGET      EQU $0001    ; include sizing system-gadget? 
  889. WFLG_DRAGBAR        EQU $0002    ; include dragging system-gadget? 
  890. WFLG_DEPTHGADGET       EQU $0004    ; include depth arrangement gadget? 
  891. WFLG_CLOSEGADGET       EQU $0008    ; include close-box system-gadget? 
  892.  
  893. WFLG_SIZEBRIGHT        EQU $0010    ; size gadget uses right border 
  894. WFLG_SIZEBBOTTOM    EQU $0020    ; size gadget uses bottom border 
  895.  
  896. ; --- refresh modes ----------------------------------------------------------
  897. ; combinations of the WFLG_REFRESHBITS select the refresh type 
  898. WFLG_REFRESHBITS    EQU $00C0
  899. WFLG_SMART_REFRESH    EQU $0000
  900. WFLG_SIMPLE_REFRESH    EQU $0040
  901. WFLG_SUPER_BITMAP    EQU $0080
  902. WFLG_OTHER_REFRESH    EQU $00C0
  903.  
  904. WFLG_BACKDROP        EQU $0100    ; this is a backdrop window 
  905.  
  906. WFLG_REPORTMOUSE    EQU $0200    ; set this to hear every mouse move
  907.  
  908. WFLG_GIMMEZEROZERO    EQU $0400    ; make extra border stuff 
  909.  
  910. WFLG_BORDERLESS        EQU $0800    ; set this to get a Window sans border 
  911.  
  912. WFLG_ACTIVATE        EQU $1000    ; when Window opens, it's the Active
  913.                     ; one
  914.  
  915. ; FLAGS SET BY INTUITION
  916. WFLG_WINDOWACTIVE    EQU $2000    ; this window is the active one
  917. WFLG_INREQUEST        EQU $4000    ; this window is in request mode
  918. WFLG_MENUSTATE        EQU $8000    ; this Window is active with its
  919.                     ; Menus on
  920.  
  921. ; --- Other User Flags -------------------------------------------------------
  922. WFLG_RMBTRAP        EQU $00010000    ; Catch RMB events for your own
  923. WFLG_NOCAREREFRESH    EQU $00020000    ; not to be bothered with REFRESH
  924.  
  925. ; --- Other Intuition Flags ----------------------------------------------
  926. WFLG_WINDOWREFRESH    EQU $01000000    ; Window is currently refreshing
  927. WFLG_WBENCHWINDOW    EQU $02000000    ; WorkBench Window
  928. WFLG_WINDOWTICKED    EQU $04000000    ; only one timer tick at a time
  929.  
  930. SUPER_UNUSED    EQU $FCFC0000    ;bits of Flag unused yet
  931.  
  932. ; - V36 new Flags which the programmer may specify in NewScreen.Flags
  933. WFLG_NW_EXTENDED    EQU $00040000    ; extension data provided
  934.                     ; see ExtNewWindow structure
  935.  
  936. ; --- V36 Flags to be set only by Intuition -------------------------
  937. WFLG_VISITOR        EQU $08000000    ; visitor window (see autodoc for OpenWindow)
  938. WFLG_ZOOMED        EQU $10000000    ; identifies "zoom state"
  939. WFLG_HASZOOM        EQU $20000000    ; window has a zoom gadget
  940.  
  941. ; --- Other Window Values ----------------------------------------------
  942. DEFAULTMOUSEQUEUE    EQU 5     ; no more mouse messages
  943.  
  944.  
  945. ; --- see struct IntuiMessage for the IDCMP Flag definitions -----------------
  946.  
  947.  
  948. ; ========================================================================
  949. ; === NewWindow ==========================================================
  950. ; ========================================================================
  951. ; NOTE: to use the new features of V36, you may need to use the
  952. ; ExtNewWindow structure, below.
  953.  STRUCTURE NewWindow,0
  954.  
  955.     WORD nw_LeftEdge        ; initial Window dimensions
  956.     WORD nw_TopEdge        ; initial Window dimensions
  957.     WORD nw_Width        ; initial Window dimensions
  958.     WORD nw_Height        ; initial Window dimensions
  959.  
  960.     BYTE nw_DetailPen        ; for rendering the detail bits of the Window
  961.     BYTE nw_BlockPen        ; for rendering the block-fill bits
  962.  
  963.     LONG nw_IDCMPFlags        ; initial IDCMP state
  964.  
  965.     LONG nw_Flags        ; see the Flag definition under Window
  966.  
  967.     ; You supply a linked-list of Gadgets for your Window.
  968.     ; This list DOES NOT include system Gadgets.  You get the standard
  969.     ; system Window Gadgets by setting flag-bits in the variable Flags (see
  970.     ; the bit definitions under the Window structure definition)
  971.     APTR    nw_FirstGadget
  972.  
  973.     ; the CheckMark is a pointer to the imagery that will be used when
  974.     ; rendering MenuItems of this Window that want to be checkmarked
  975.     ; if this is equal to NULL, you'll get the default imagery
  976.     APTR nw_CheckMark
  977.  
  978.     APTR nw_Title        ; title text for the Window
  979.     
  980.     ; the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  981.     ; want this Window to open in it.  If so, you pass the address of the
  982.     ; Custom Screen structure in this variable.  Otherwise, this variable
  983.     ; is ignored and doesn't have to be initialized.
  984.     APTR nw_Screen
  985.     
  986.     ; WFLG_SUPER_BITMAP Window?  If so, put the address of your BitMap
  987.     ; structure in this variable.  If not, this variable is ignored and
  988.     ; doesn't have to be initialized
  989.     APTR nw_BitMap
  990.  
  991.     ; the values describe the minimum and maximum sizes of your Windows.
  992.     ; these matter only if you've chosen the WFLG_SIZEGADGET Gadget option,
  993.     ; which means that you want to let the User to change the size of 
  994.     ; this Window.  You describe the minimum and maximum sizes that the
  995.     ; Window can grow by setting these variables.  You can initialize
  996.     ; any one these to zero, which will mean that you want to duplicate
  997.     ; the setting for that dimension (if MinWidth == 0, MinWidth will be
  998.     ; set to the opening Width of the Window).
  999.     ; You can change these settings later using SetWindowLimits().
  1000.     ; If you haven't asked for a GTYP_SIZING Gadget, you don't have to
  1001.     ; initialize any of these variables.
  1002.     WORD nw_MinWidth
  1003.     WORD nw_MinHeight
  1004.     WORD nw_MaxWidth
  1005.     WORD nw_MaxHeight
  1006.  
  1007.     ; the type variable describes the Screen in which you want this Window to
  1008.     ; open.  The type value can either be CUSTOMSCREEN or one of the
  1009.     ; system standard Screen Types such as WBENCHSCREEN.  See the
  1010.     ; type definitions under the Screen structure
  1011.     ; A new possible value for this field is PUBLICSCREEN, which
  1012.     ; defines the window as a 'visitor' window.  See below for
  1013.     ; additional information provided.
  1014.     WORD nw_Type
  1015.  
  1016.     LABEL nw_SIZE
  1017.     LABEL nw_SIZEOF
  1018.  
  1019. ; ExtNewWindow -- NewWindow plus extension fields.
  1020. ; This structure may be extended again, so programs depending on its
  1021. ; size are incorrect.
  1022.  
  1023.  STRUCTURE ExtNewWindow,nw_SIZE
  1024.  
  1025.     ; extensions for V36
  1026.     ; if the NewWindow Flag WFLG_NW_EXTENDED is set, then
  1027.     ; this field is assumed to point to an array (or chain of arrays)
  1028.     ; of TagItem structures.  See also ExtNewScreen for another
  1029.     ; use of TagItems to pass optional data.
  1030.     ;
  1031.     ; see below for tag values and the corresponding data
  1032.  
  1033.     APTR    enw_Extension    ; pointer to TagItem array
  1034.     LABEL enw_SIZEOF
  1035.  
  1036. * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1037. * They are values in a TagItem array passed as extension/replacement
  1038. * values for the data in NewWindow.  OpenWindowTagList() can actually
  1039. * work well with a NULL NewWindow pointer.
  1040.  
  1041.     ENUM TAG_USER+100
  1042.  
  1043.     ; these tags simply override NewWindow parameters
  1044.     EITEM WA_Left
  1045.     EITEM WA_Top
  1046.     EITEM WA_Width
  1047.     EITEM WA_Height
  1048.     EITEM WA_DetailPen
  1049.     EITEM WA_BlockPen
  1050.     EITEM WA_IDCMP
  1051.     EITEM WA_Flags    ; not implemented at present
  1052.     EITEM WA_Gadgets
  1053.     EITEM WA_Checkmark
  1054.     EITEM WA_Title
  1055.     EITEM WA_ScreenTitle    ; means you don't have to call SetWindowTitles
  1056.                  ; after you open your window
  1057.  
  1058.     EITEM WA_CustomScreen
  1059.     EITEM WA_SuperBitMap    ; also implies WFLG_SUPER_BITMAP property
  1060.     EITEM WA_MinWidth
  1061.     EITEM WA_MinHeight
  1062.     EITEM WA_MaxWidth
  1063.     EITEM WA_MaxHeight
  1064.  
  1065.     ; The following are specifications for new features
  1066.  
  1067.     EITEM WA_InnerWidth
  1068.     EITEM WA_InnerHeight ; You can specify the dimensions of the interior
  1069.              ; region of your window, independent of what
  1070.              ; the border widths will be.  You probably want
  1071.              ; to also specify WA_AutoAdjust to allow
  1072.              ; Intuition to move your window or even
  1073.              ; shrink it so that it is completely on screen.
  1074.  
  1075.     EITEM WA_PubScreenName    ; declares that you want the window to open as
  1076.              ; a visitor on the public screen whose name is
  1077.              ; pointed to by (UBYTE *) ti_Data
  1078.  
  1079.     EITEM WA_PubScreen    ; open as a visitor window on the public screen
  1080.             ; whose address is in (struct Screen *) ti_Data.
  1081.             ; To ensure that this screen remains open, you
  1082.             ; should either be the screen's owner, have a
  1083.             ; window open on the screen, or use LockPubScreen().
  1084.  
  1085.     EITEM WA_PubScreenFallBack    ; A Boolean, specifies whether a visitor window
  1086.              ; should "fall back" to the default public screen
  1087.              ; (or Workbench) if the named public screen isn't
  1088.              ; available
  1089.  
  1090.     EITEM WA_WindowName    ; not implemented
  1091.     EITEM WA_Colors    ; a ColorSpec array for colors to be set
  1092.             ; when this window is active.  This is not 
  1093.             ; implemented, and may not be, since the default
  1094.             ; values to restore would be hard to track.
  1095.             ; We'd like to at least support per-window colors
  1096.             ; for the mouse pointer sprite.
  1097.  
  1098.     EITEM WA_Zoom    ; ti_Data points to an array of four WORD's,
  1099.             ; the initial Left/Top/Width/Height values of
  1100.             ; the "alternate" zoom position/dimensions.
  1101.             ; It also specifies that you want a Zoom gadget
  1102.             ; for your window, whether or not you have a
  1103.             ; sizing gadget.
  1104.  
  1105.     EITEM WA_MouseQueue    ; ti_Data contains initial value for the mouse
  1106.             ; message backlog limit for this window.
  1107.  
  1108.     EITEM WA_BackFill    ; unimplemented at present: provides a "backfill
  1109.             ; hook" for your window's layer.
  1110.  
  1111.     EITEM WA_RptQueue    ; initial value of repeat key backlog limit
  1112.  
  1113.     ; These Boolean tag items are alternatives to the NewWindow.Flags
  1114.     ; boolean flags with similar names.
  1115.  
  1116.     EITEM WA_SizeGadget
  1117.     EITEM WA_DragBar
  1118.     EITEM WA_DepthGadget
  1119.     EITEM WA_CloseGadget
  1120.     EITEM WA_Backdrop
  1121.     EITEM WA_ReportMouse
  1122.     EITEM WA_NoCareRefresh
  1123.     EITEM WA_Borderless
  1124.     EITEM WA_Activate
  1125.     EITEM WA_RMBTrap
  1126.     EITEM WA_WBenchWindow    ; PRIVATE!!
  1127.     EITEM WA_SimpleRefresh    ; only specify if TRUE
  1128.     EITEM WA_SmartRefresh    ; only specify if TRUE
  1129.     EITEM WA_SizeBRight
  1130.     EITEM WA_SizeBBottom
  1131.  
  1132.     ; New Boolean properties
  1133.     EITEM WA_AutoAdjust    ; shift or squeeze the window's position and
  1134.             ; dimensions to fit it on screen.
  1135.  
  1136.     EITEM WA_GimmeZeroZero    ; equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO
  1137.  
  1138.     ; New for V37: WA_MenuHelp (ignored by V36)
  1139.     EITEM WA_MenuHelp    ; Enables IDCMP_MENUHELP:  Pressing HELP during menus
  1140.             ; will return IDCMP_MENUHELP IDCMP message.
  1141.  
  1142. *** End of Window attribute enumeration ***
  1143.  
  1144.  
  1145.  
  1146.     IFND INTUITION_SCREENS_I
  1147.     INCLUDE "intuition/screens.i"
  1148.     ENDC
  1149.  
  1150.     IFND INTUITION_PREFERENCES_I
  1151.     INCLUDE "intuition/preferences.i"
  1152.     ENDC
  1153.  
  1154. ; ========================================================================
  1155. ; === Remember ===========================================================
  1156. ; ========================================================================
  1157. ; this structure is used for remembering what memory has been allocated to
  1158. ; date by a given routine, so that a premature abort or systematic exit
  1159. ; can deallocate memory cleanly, easily, and completely
  1160.  STRUCTURE Remember,0
  1161.  
  1162.     APTR rm_NextRemember
  1163.     LONG rm_RememberSize
  1164.     APTR rm_Memory
  1165.  
  1166.  LABEL    rm_SIZEOF
  1167.  
  1168.  STRUCTURE ColorSpec,0
  1169.  
  1170.     WORD cs_ColorIndex    ; -1 terminates an array of ColorSpec
  1171.     UWORD cs_Red    ; only six bits recognized in V36
  1172.     UWORD cs_Green    ; only six bits recognized in V36
  1173.     UWORD cs_Blue    ; only six bits recognized in V36
  1174.  LABEL    cs_SIZEOF
  1175.  
  1176. * === Easy Requester Specification ======================================= *
  1177. * see also autodocs for EasyRequest and BuildEasyRequest
  1178. * NOTE: This structure may grow in size in the future
  1179.  
  1180.  STRUCTURE EasyStruct,0
  1181.  
  1182.     ULONG es_StructSize        ; should be es_SIZEOF
  1183.     ULONG es_Flags        ; should be 0 for now
  1184.     APTR  es_Title        ; title of requester window
  1185.     APTR  es_TextFormat        ; 'printf' style formatting string
  1186.     APTR  es_GadgetFormat    ; 'printf' style formatting string
  1187.  LABEL    es_SIZEOF
  1188.  
  1189.  
  1190.  
  1191. ; ======================================================================== 
  1192. ; === Miscellaneous ====================================================== 
  1193. ; ======================================================================== 
  1194.  
  1195. ; = MACROS ============================================================== 
  1196. ;#define MENUNUM(n) (n & 0x1F)
  1197. ;#define ITEMNUM(n) ((n >> 5) & 0x003F)
  1198. ;#define SUBNUM(n) ((n >> 11) & 0x001F)
  1199. ;
  1200. ;#define SHIFTMENU(n) (n & 0x1F)
  1201. ;#define SHIFTITEM(n) ((n & 0x3F) << 5)
  1202. ;#define SHIFTSUB(n) ((n & 0x1F) << 11)
  1203. ;
  1204. ;#define SRBNUM(n)  (0x08 - (n >> 4))  /* SerRWBits -> read bits per char */
  1205. ;#define SWBNUM(n)  (0x08 - (n & 0x0F))/* SerRWBits -> write bits per chr */
  1206. ;#define SSBNUM(n)  (0x01 + (n >> 4))  /* SerStopBuf -> stop bits per chr */
  1207. ;#define SPARNUM(n) (n >> 4)           /* SerParShk -> parity setting    */
  1208. ;#define SHAKNUM(n) (n & 0x0F)         /* SerParShk -> handshake mode    */
  1209. ;
  1210. ; = MENU STUFF =========================================================== 
  1211. NOMENU EQU    $001F
  1212. NOITEM EQU    $003F
  1213. NOSUB  EQU    $001F
  1214. MENUNULL EQU    $FFFF
  1215.  
  1216.  
  1217. ; = =RJ='s peculiarities =================================================
  1218. ;#define FOREVER for(;;)
  1219. ;#define SIGN(x) ( ((x) > 0) - ((x) < 0) )
  1220.  
  1221.  
  1222. ; these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  1223. ; I'll use a generic Width (for all resolutions) for the CheckMark.
  1224. ; If COMMSEQ, likewise I'll use this generic stuff
  1225. CHECKWIDTH    EQU    19
  1226. COMMWIDTH    EQU    27
  1227. LOWCHECKWIDTH    EQU    13
  1228. LOWCOMMWIDTH    EQU    16
  1229.  
  1230.  
  1231. ; these are the AlertNumber defines.  if you are calling DisplayAlert()
  1232. ; the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1233. ; of these patterns
  1234. ALERT_TYPE    EQU    $80000000
  1235. RECOVERY_ALERT    EQU    $00000000    ; the system can recover from this
  1236. DEADEND_ALERT    EQU    $80000000    ; no recovery possible, this is it
  1237.  
  1238.  
  1239. ; When you're defining IntuiText for the Positive and Negative Gadgets 
  1240. ; created by a call to AutoRequest(), these defines will get you 
  1241. ; reasonable-looking text.  The only field without a define is the IText
  1242. ; field; you decide what text goes with the Gadget
  1243. AUTOFRONTPEN    EQU    0
  1244. AUTOBACKPEN    EQU    1
  1245. AUTODRAWMODE    EQU    RP_JAM2
  1246. AUTOLEFTEDGE    EQU    6
  1247. AUTOTOPEDGE    EQU    3
  1248. AUTOITEXTFONT    EQU    0
  1249. AUTONEXTTEXT    EQU    0
  1250.  
  1251.  
  1252.  
  1253. ;* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) -------------------
  1254. SELECTUP    EQU    (IECODE_LBUTTON+IECODE_UP_PREFIX)
  1255. SELECTDOWN    EQU    (IECODE_LBUTTON)
  1256. MENUUP        EQU    (IECODE_RBUTTON+IECODE_UP_PREFIX)
  1257. MENUDOWN    EQU    (IECODE_RBUTTON)
  1258. ALTLEFT        EQU    (IEQUALIFIER_LALT)
  1259. ALTRIGHT    EQU    (IEQUALIFIER_RALT)
  1260. AMIGALEFT    EQU    (IEQUALIFIER_LCOMMAND)
  1261. AMIGARIGHT    EQU    (IEQUALIFIER_RCOMMAND)
  1262. AMIGAKEYS    EQU    (AMIGALEFT+AMIGARIGHT)
  1263.             
  1264. CURSORUP    EQU    $4C
  1265. CURSORLEFT    EQU    $4F
  1266. CURSORRIGHT    EQU    $4E
  1267. CURSORDOWN    EQU    $4D
  1268. KEYCODE_Q    EQU    $10
  1269. KEYCODE_X    EQU    $32
  1270. KEYCODE_N    EQU    $36
  1271. KEYCODE_M    EQU    $37
  1272. KEYCODE_V       EQU    $34
  1273. KEYCODE_B       EQU    $35
  1274. KEYCODE_LESS    EQU    $38
  1275. KEYCODE_GREATER    EQU    $39
  1276.  
  1277.     IFND    INTUITION_INTUITIONBASE_I
  1278.     INCLUDE    "intuition/intuitionbase.i"
  1279.     ENDC
  1280.  
  1281. * Include obsolete identifiers:
  1282.     IFND    INTUITION_IOBSOLETE_I
  1283.     INCLUDE "intuition/iobsolete.i"
  1284.     ENDC
  1285.  
  1286.     ENDC
  1287.